let _options;
let model_id;
const app = getApp();
let util = require("../../../../../utils/util");
let toggleCollection = true;
Page({
  data: {
    scroll: false,
  },
  onLoad: function (options) {
    // util.colleation(this, '', "1");
    toggleCollection = true;
    model_id = options.model_id;
    if (options.desc != undefined) {
      _options = options;
      this.setData({
        desc: options.desc.split("#")[0],
      });
    }
  },
  onShareAppMessage: function () {
    return {
      path: `/pages/tools/banshi/problem/item/item?model_id=${model_id}`,
      imageUrl: app.globalData.shareImage ? app.globalData.shareImage : "http://imgbdb3.bendibao.com/xcxbdb/file/20212/9/20210209161843_68677.jpg",
      title: "本地宝"
    }
  },
  failNavi() {
    let id = _options.desc.split("#")[1];
  },
  onPageScroll() {
    if (toggleCollection) {
      this.setData({
        scroll: true,
      });
      toggleCollection = false;
    }

  },
  closeCollection() {
    toggleCollection = false;
  },
  openCollection() {
    toggleCollection = true;
  }
});